/*
* Copyright (c) 2024 -present FengJinjian ( 751965763@qq.com )

* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package edu.vital.energy.longevity.service;

import edu.vital.energy.longevity.domain.dto.contract.ContractCreateDTO;
import edu.vital.energy.longevity.domain.dto.contract.ContractQueryDTO;
import edu.vital.energy.longevity.domain.dto.contract.ContractUpdateDTO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * 合同表服务接口
 *
 * @version 1.0.1
 * @author Feng JinJian
 * @date 2025-01-14
 */
public interface IContractService {
    /**
     * 分页查询合同表列表
     */
    Map<String, Object> getContractPage(Integer pageNum, Integer pageSize, ContractQueryDTO query);
    
    /**
     * 获取合同表详情
     */
    Object getContractById(Long id);
    
    /**
     * 创建合同表
     * @return 新创建的合同表ID
     */
    Long createContract(ContractCreateDTO dto);
    
    /**
     * 更新合同表
     * @return 更新的记录数
     */
    int updateContract(Long id, ContractUpdateDTO dto);
    
    /**
     * 删除合同表
     * @return 删除的记录数
     */
    int deleteContract(Long id);
    
    /**
     * 批量删除合同表
     * @return 删除的记录数
     */
    int batchDeleteContract(List<Long> ids);
    
    /**
     * 导出合同表数据
     */
    byte[] exportContract(ContractQueryDTO query);
    
    /**
     * 导入合同表数据
     */
    void importContract(MultipartFile file);
    
    /**
     * 更新合同表状态
     */
    void updateContractStatus(Long id, Integer status);
}
